package edu.caece.automaton;

public class StateImpl implements State {

	private String name;

	public StateImpl(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}

	@Override
	public boolean equals(Object obj) {
		boolean isEqual = false;
		if (obj instanceof State) {
			State other = (State) obj;

			isEqual = this.name.equals(other.getName());
		}
		return isEqual;
	}

	@Override
	public int hashCode() {
		return this.name.hashCode();
	}

	@Override
	public String toString() {
		return this.name;
	}
}
